<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/zh-cn-system.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/table_form.css" />
<script type="text/javascript" src="/Public/Js/jquery.min.js"></script>
<script type="text/javascript" src="/Public/Js/jquery.form.js"></script>
<script src="/Public/Js/main.js"></script>
<script type="text/javascript" src="/Public/Js/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/Public/Js/artDialog/plugins/iframeTools.js"></script>
<script type="text/javascript">
$(function(){
	$('#myform').ajaxForm({
		beforeSubmit:  checkForm,
		success:       complete,
		dataType: 'json'
	});
	function checkForm(){
		var opwd = $('#old_password').val(),
			npwd = $('#new_password').val(),
			cpwd = $('#new_pwdconfirm').val();
			
		if(opwd==''){
			checkInfo('old_password','原密码不能为空');
			$('#old_password').focus();
			return false;
		}else if(npwd.length < '5'){
			checkInfo('new_password','新密码不能少于5个字符');
			$('#new_password').focus();
			return false;
		}else if(cpwd != npwd){
			checkInfo('new_pwdconfirm','两次输入的密码不一样');
			$('#new_pwdconfirm').focus();
			return false;
		}else{
			return true;	
		}
	}
	
	var origin = $.artDialog.open.origin;
    function complete(data){
        msg(data.info,data.data);
		$('#old_password').val('');
		$('#new_password').val('');
		$('#new_pwdconfirm').val('');
		//if(data.status==1) setTimeout("location.reload()",1500);
    }
	
	$('#alipay').ajaxForm({
		//beforeSubmit:  checkForm,
		success: function(data){  msg(data.info,data.data);},
		dataType: 'json'
	});
	$('#sms').ajaxForm({
		//beforeSubmit:  checkForm,
		success: function(data){  msg(data.info,data.data);},
		dataType: 'json'
	});
})
</script>
</head>
<body>
<div class="pad-lr-10">

	<div class="col-2 lf mr10" style="width:100%">
		<h6> 修改密码</h6>
		<div class="content">
			<form action="__URL__/password" method="post" id="myform">
			<table width="100%"  class="table_form">
			  <tr>
				<th width="120">用户名：</th>
				<td>{$_SESSION.admin_user} </td>
			  </tr>
			  <tr>
				<th>原密码：</th>
				<td><input type="password" class="input-text" name="old_password" id="old_password" size="30"/><span class="onShow"></span></td>
			  </tr>
			  <tr>
				<th>新密码：</th>
				<td><input type="password" class="input-text" name="new_password" id="new_password" size="30" /><span class="onShow"></span></td>
			  </tr>
			  <tr>
				<th>确认密码：</th>
				<td><input type="password" class="input-text" name="new_pwdconfirm" id="new_pwdconfirm" size="30" /><span class="onShow"></span></td>
			  </tr>
			  <tr>
				<th>&nbsp;</th>
				<td>
				<input name="id" value="{$_SESSION['admin_id']}" type="hidden" />
				<input name="dosubmit" type="submit" value="确定修改" class="button">
				</td>
			  </tr>
			</table>
			</form>
		</div><!--.content-->
	</div>

	<div class="col-2 lf mr10" style="width:100%;margin-top:10px;clear:both">
		<h6> 支付宝设置</h6>
		<div class="content">
			<form action="__URL__/alipay" method="post" id="alipay">
			<table width="100%"  class="table_form">
			  <tr>
				<th width="120">合作者身份(PID)：</th>
				<td><input type="text" class="input-text" name="pid" id="pid" value="{$alipay.pid}" style="width:220px;" /></td>
			  </tr>
			  <tr>
				<th>交易密钥：</th>
				<td><input type="password" class="input-text" name="key" id="key" value="{$alipay.key}"  style="width:220px;" /></td>
			  </tr>
			  <tr>
				<th>支付宝账户：</th>
				<td><input type="text" class="input-text" name="email" id="email" value="{$alipay.email}"  style="width:220px;" /></td>
			  </tr>
			  <tr>
				<th>&nbsp;</th>
				<td>
				<input type="submit" value="确定" class="button">
				</td>
			  </tr>
			</table>
			</form>
		</div><!--.content-->
	</div>
    <!--
    <div class="col-2 lf mr10" style="width:100%;margin-top:10px;clear:both">
		<h6> 短信账号设置</h6>
		<div class="content">
			<form action="__URL__/sms" method="post" id="sms">
			<table width="100%"  class="table_form">
			  <tr>
				<th width="120">账号：</th>
				<td><input type="text" class="input-text" name="user" id="user" value="{$sms.user}" style="width:220px;" /></td>
			  </tr>
			  <tr>
				<th>密码：</th>
				<td><input type="password" class="input-text" name="pass" id="pass" value="{$sms.pass}"  style="width:220px;" /></td>
			  </tr>
			  <tr>
				<th>&nbsp;</th>
				<td>
				<input type="submit" value="确定" class="button">
				</td>
			  </tr>
			</table>
			</form>
		</div>
        -->
	</div>


</div>
</body>
</html>